<template>
  <div class="full">
    <div class="title betweenbox">
      <div>
        <span class="iconfont iconshexiangtou"></span>
        <span>摄像机分布图</span>
      </div>
      <div class="top-back" @click="()=>{$router.push('/videomonitor')}"></div>
    </div>
    <div class="camera betweenbox">
      <div class="camera-left">
        <Left @handleNodeClick="handleNodeClick" />
      </div>
      <div class="camera-right">
        <Right ref="right" />
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import Left from "./modules/Left/index.vue";
import Right from "./modules/Right/index.vue";

@Component({
  components: { Left, Right },
})
export default class extends Vue {
  $refs!: {
    right: Right;
  };
  handleNodeClick(params) {
    if(params.type==='bdz'){
      params.id=params.id||''
      let id=params.id.split('#')[0]
      this.$refs.right.setSvg(id);
    }
  }
}
</script>
<style lang="scss" scoped>
.title {
  width: 100%;
  height: 0.4rem;
  font-size: 0.18rem;
  line-height: 0.4rem;
  color: #fff;
  .icongeipaishui {
    margin-right: 0.1rem;
  }
}
.camera {
  width: 100%;
  height: calc(100% - 0.4rem);
  &-left {
    width: 3.2rem;
    height: 100%;
  }
  &-right {
    width: calc(100% - 3.3rem);
    height: 100%;
  }
}
</style>